package com.yzz.shopping.domain.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sixby.domain.dao.OrderMapper;
import com.sixby.domain.entity.Order;

@Service
@Transactional
public class ShoppingService {
    @Autowired
    private OrderMapper orderMapper;

    public Order findById(String id){
        return orderMapper.selectByPrimaryKey(id);
    }

    public void save(Order order){
        orderMapper.insert(order);
    }

    public void delete(String id){
        orderMapper.deleteByPrimaryKey(id);
    }
}
